# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=lcms2

pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.6
pkgrel=1
pkgdesc="Small-footprint color management engine, version 2 (mingw-w64)"
arch=(any)
url="http://www.littlecms.com"
license=("MIT")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libtiff")
options=('staticlibs' 'strip')
source=("http://downloads.sourceforge.net/sourceforge/lcms/lcms2-${pkgver}.tar.gz")
md5sums=('f4c08d38ceade4a664ebff7228910a33')

build() {
  cd "$srcdir/${_realname}-$pkgver"

  cd "${srcdir}/${_realname}-${pkgver}"
  ./configure \
    --build=${MINGW_CHOST} \
    --host=${MINGW_CHOST} \
    --target=${MINGW_CHOST} \
    --prefix=${MINGW_PREFIX}

  make
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make DESTDIR="$pkgdir" install
  #rm -r "${pkgdir}${MINGW_PREFIX}/share"
  #rm ${pkgdir}${MINGW_PREFIX}/bin/*.exe
}
